<template>
	<view>
		<view class="people-info-background">
			<view class="people-info-info">
				<image class="people-head-image" src="../../static/logo_144.png" mode="aspectFill"></image>
				<view class="people-info-content-view">
					<view class="people-info">
						<view class="people-name util-font-medium">HY</view>
					</view>
					<view class="people-info">
						<view class="people-city util-font-medium">济南市</view>
						<view class="people-type util-font-medium">间接达人</view>
					</view>
					<view class="people-info">
						<view class="people-other util-font-medium">邀请时间：</view>
						<view class="people-other util-font-medium">2020-07-10 14:25:25</view>
					</view>
				</view>
			</view>

			<view class="people-items-list">
				<view class="people-items util-font-regular">
					<view class="people-items-number">
						<view class="people-items-number-value util-font-medium">0</view>
					</view>
					<view class="people-items-title">贡献订单</view>
				</view>
				<view class="people-items util-font-regular">
					<view class="people-items-number">
						<view class="people-items-number-value util-font-medium">0.00</view>
					</view>
					<view class="people-items-title">成交金额(元)</view>
				</view>
				<view class="people-items util-font-regular">
					<view class="people-items-number">
						<view class="people-items-number-value util-font-medium">0.50</view>
					</view>
					<view class="people-items-title">贡献收益(元)</view>
				</view>
				<view class="people-items util-font-regular">
					<view class="people-items-number">
						<view class="people-items-number-value util-font-medium">1</view>
					</view>
					<view class="people-items-title">团队成员</view>
				</view>
			</view>
		</view>
		<view class="invite-view">
			<view class="invite-people">TA的邀请人</view>
			<view class="invite-people-view">
				<view>
					<image class="invite-people-head-image" src="../../static/logo_144.png" mode="aspectFill"></image>
					<view class="people-info-content-view">
						<view class="people-info">
							<view class="invite-people-name util-font-medium">HY</view>
							<view class="invite-people-city util-font-medium">济南市</view>
						</view>
						<view class="people-info" style="margin-top: 20rpx;">
							<view class="invite-people-other util-font-medium">贡献收益:￥2*****</view>
							<view class="invite-people-other util-font-medium" style="margin-left: 20rpx;margin-right: 10rpx;"> | </view>
							<view class="invite-people-other util-font-medium">团队:2****人</view>
						</view>
					</view>
				</view>
			</view>
		</view>

		<view class="invite-content">
			<image class="invite-content-image" src="../../static/workbench/address_book.png" mode="aspectFit"></image>
			<view class="invite-content-value">邀请他留下联系方式</view>
			<view class="invite-content-lx">邀请</view>
		</view>






		<view class="orders">
			<view class="orders-title">贡献订单</view>
			<view class="scroll-view">
				<view class="item" v-for="(item, index) in dataList" :key="index">
					<view class="item-header-view util-font-regular">
						<image class="item-header-image" src="../../static/logo_144.png" mode="aspectFill"></image>
						<view class="item-header-type">自购订单</view>
						<view class="item-header-status">已到账</view>
					</view>
					<view class="item-content-view util-font-regular">
						<image class="item-content-image" src="../../static/logo_144.png" mode="aspectFill"></image>
						<view class="item-content-title">0.99元一杯限时抢！门市价12元的【橙满杯鲜果鲜茶】满杯橙子！维C满满，超讨喜！</view>
						<view class="item-content-price">
							<view class="item-content-price-value">￥0.99</view>
							<view class="item-content-price-number">X1</view>
						</view>
					</view>
					<view class="item-other-view util-font-regular" v-if="item">
						<view class="item-other-row">购买人：张**</view>
						<view class="item-other-row">下单时间：2020-07-31 13:00:00</view>
						<view class="item-other-row">订单编号：20200817193813530714219</view>
						<view class="item-other-row">收入详情：佣金0.79+平台分红0.00</view>
					</view>
					<view v-if="item" class="item-button-view util-font-regular" @click="hide(index)">
						<image class="item-button-image" src="../../static/workbench/up_button.png" mode="aspectFill"></image>
						<view class="item-button-title">收起</view>
					</view>
					<view v-else class="item-button-view util-font-regular" @click="show(index)">
						<image class="item-button-image" src="../../static/workbench/down_button.png" mode="aspectFill"></image>
						<view class="item-button-title">展开</view>
					</view>
					<view class="item-footer-view util-font-medium">
						<view class="item-footer-price">0.79元</view>
						<view class="item-footer-title">预计赚：</view>
					</view>
				</view>
			</view>


		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 列表数据
				mescroll: null, // mescroll的实例化对象
				dataList: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],

			}
		},
		onLoad() {

		},
		methods: {

			loadData: function() {
				var that = this
				setTimeout(function() {
					let currentPageData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
					let totalPage = 4

					if (that.mescroll.num == 1) {
						that.dataList = []
					}
					that.dataList = that.dataList.concat(currentPageData)

					that.$nextTick(function() {
						that.mescroll.endByPage(currentPageData.length, totalPage)
					})
				}, 2000)
			},
			show: function(index) {
				this.dataList.splice(index, 1, true)
			},
			hide: function(index) {
				this.dataList.splice(index, 1, false)
			}
		}
	}
</script>

<style>
	.people-info-background {
		width: 660rpx;
		height: 300rpx;
		margin: 0 20rpx;
		padding: 20rpx 25rpx;
		background: linear-gradient(to right, #eb8735, #ea5a2e);
		border-radius: 20rpx;
		margin-top: 30rpx;
	}

	.people-info-info {
		display: inline;
	}

	.people-head-image {
		width: 120rpx;
		height: 120rpx;
		margin-top: 10upx;
		float: left;
		border-radius: 60rpx;
	}

	.people-info-content-view {
		width: 500rpx;
		height: 100rpx;
		float: left;
		margin-left: 15rpx;
	}

	.people-info {
		height: 40rpx;
	}

	.people-name {
		display: inline-block;
		color: #FFFFFF;
		font-size: 26rpx;
	}


	.people-city {
		display: inline-block;
		color: #ED7E57;
		font-size: 20rpx;
		padding: 5rpx 10rpx 5rpx 10rpx;
		border-radius: 10upx;
		background-color: #FCECE2;
	}

	.people-type {
		display: inline-block;
		color: #8A7648;
		font-size: 20rpx;
		margin-left: 10rpx;
		padding: 5rpx 10rpx 5rpx 10rpx;
		border-radius: 10upx;
		background-color: #FFF6DE;
	}

	.people-other {
		display: inline-block;
		color: #FFFFFF;
		font-size: 20rpx;
	}

	.people-items-list {
		margin-top: 20rpx;
		display: flex;
		float: left;
		justify-content: space-between;
	}

	.people-items {
		width: 165rpx;
		text-align: center;
	}

	.people-items-title {
		width: 100%;
		height: 42rpx;
		line-height: 42rpx;
		font-size: 20rpx;
		margin-top: 10rpx;
		color: #FFFFFF;
	}

	.people-items-number {
		width: 100%;
		height: 43rpx;
		line-height: 43rpx;
		margin-top: 20rpx;
	}

	.people-items-number-unit {
		color: #FFFFFF;
		font-size: 24rpx;
		display: inline-block;
	}

	.people-items-number-value {
		color: #FFFFFF;
		font-size: 32rpx;
		display: inline-block;
	}


	.invite-content {
		height: 90rpx;
		line-height: 90rpx;
		position: relative;
		padding-left: 30rpx;
		padding-right: 30upx;
	}


	.invite-content-image {
		width: 36rpx;
		height: 36rpx;
		margin-top: 27upx;
		display: inline-block;
		float: left;
	}

	.invite-content-value {
		font-size: 20rpx;
		color: #E95918;
		height: 36rpx;
		position: relative;
		float: left;
		display: inline-block;
		margin-left: 10rpx;
	}

	.invite-content-lx {
		float: right;
		font-size: 20rpx;
		color: #E95918;
		border-radius: 40rpx;
		width: 100rpx;
		text-align: center;
		height: 40rpx;
		margin-top: 27rpx;
		line-height: 40rpx;
		border-color: #E95918;
		border: 1upx solid;
	}


	.invite-people {
		margin-left: 30upx;
		font-size: 26rpx;
		margin-top: 30rpx;
		color: #666666;
	}

	.invite-people-view {
		width: 660rpx;
		height: 120rpx;
		margin: 0 20rpx;
		padding: 20rpx 25rpx;
		margin-top: 10rpx;
	}

	.invite-people-name {
		display: inline-block;
		color: #333333;
		font-size: 26rpx;
	}

	.invite-people-city {
		display: inline-block;
		color: #ED7E57;
		font-size: 20rpx; 
		padding: 5rpx 10rpx 5rpx 10rpx;
		border-radius: 10upx;
		margin-left: 10rpx;
		background-color: #FCECE2;
	}

	.invite-people-other {
		display: inline-block;
		color: #666666;
		font-size: 20rpx;
	}

	.invite-people-head-image {
		width: 100rpx;
		height: 100rpx;
		margin-top: 10upx;
		float: left;
		border-radius: 50rpx;
	}

	.orders {
		background-color: #f5f5f5;
		padding-top: 30rpx;
	}

	.orders-title {
		margin-left: 30upx;
		font-size: 30rpx;
		color: #333333;
	}

	.item {
		width: 650rpx;
		margin: 20rpx;
		padding: 25rpx 30rpx;
		background-color: white;
		border-radius: 20rpx;
	}

	.item-header-view {
		width: 100%;
		height: 52rpx;
	}

	.item-header-image {
		width: 52rpx;
		height: 52rpx;
		overflow: hidden;
		border-radius: 26rpx;
		float: left;
	}

	.item-header-type {
		width: 115rpx;
		height: 36rpx;
		line-height: 36rpx;
		text-align: center;
		color: #db6b21;
		background-color: #ffeedb;
		font-size: 24rpx;
		float: left;
		margin-top: 8rpx;
		margin-left: 10rpx;
	}

	.item-header-status {
		height: 52rpx;
		line-height: 52rpx;
		color: #333333;
		float: right;
		font-size: 26rpx;
	}

	.item-content-view {
		width: 100%;
		height: 96rpx;
		margin-top: 25rpx;
	}

	.item-content-image {
		width: 120rpx;
		height: 96rpx;
		border-radius: 10rpx;
		overflow: hidden;
		float: left;
	}

	.item-content-title {
		width: 380rpx;
		height: 76rpx;
		line-height: 38rpx;
		font-size: 26rpx;
		margin-left: 20rpx;
		float: left;
		text-overflow: -o-ellipsis-lastline;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.item-content-price {
		height: 96rpx;
		float: right;
		text-align: right;
	}

	.item-content-price-value {
		color: #333333;
		font-size: 28rpx;
	}

	.item-content-price-number {
		color: #999999;
		font-size: 24rpx;
	}

	.item-other-view {
		width: 100%;
		color: #999999;
		font-size: 26rpx;
		margin-top: 20rpx;
	}

	.item-other-row {
		width: 100%;
		height: 44rpx;
		line-height: 44rpx;
	}

	.item-button-view {
		width: 100%;
		height: 45rpx;
		text-align: right;
		border-bottom: 2rpx solid #f1f1f1;
	}

	.item-button-image {
		width: 20rpx;
		height: 20rpx;
		margin-top: 8rpx;
		float: right;
	}

	.item-button-title {
		height: 40rpx;
		line-height: 40rpx;
		float: right;
		color: #999999;
		font-size: 24rpx;
		margin-right: 5rpx;
	}

	.item-footer-view {
		width: 100%;
		height: 70rpx;
	}

	.item-footer-price {
		height: 44rpx;
		line-height: 44rpx;
		margin-top: 20rpx;
		float: right;
		font-size: 38rpx;
		color: #cd6938;
	}

	.item-footer-title {
		height: 30rpx;
		line-height: 30rpx;
		margin-top: 30rpx;
		float: right;
		font-size: 28rpx;
		color: #999999;
	}
</style>
